<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>doublebind</title>
</head>
<body>
    <div id="app">
        <input type="text" @keyup.enter="submit"/>
    </div>

    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>
        var app = new Vue({
            el:"#app",
            data:{
                name:"刘德华",
                num:20
            },
            methods:{
                submit(){
                    alert("安了回车");
                }
            }
        });
    </script>
</body>
</html>